<?php
defined('_JEXEC') or die( 'Restricted access' );

jimport( 'joomla.application.component.view');

class IgcategoryViewIgcategory extends JView
{
	function display($tpl = null)
	{
	    global $mainframe;
		$source = JRequest::getCmd('source', 'component');
		$configArray =& JComponentHelper::getParams('com_igallery');
		$user =& JFactory::getUser();
	    //JHTML::_('behavior.mootools');
		$model =& $this->getModel('igcategory');

	    $category = $model->getData();
		$cid = JRequest::getVar('cid', array(0));
		if((int)$cid[0] >0 ){
			$model->hits();
		}
		
		$catInfo  = $model->getCatinfo();

		$pathway   =& $mainframe->getPathway();
		$pathway->addItem($catInfo->name);
		
	    $Itemid = JRequest::getInt('Itemid', '');
		$total		= &$this->get('total');
		$pagination	= &$this->get('pagination');
		
		$this->assignRef( 'pagination' , $pagination );
		$this->assignRef('category',             $category);
		$this->assignRef('catInfo',              $catInfo);
		//$this->assignRef('registerLink',      $registerLink);

        parent::display($tpl);
	}
}